import hyRequest from "..";
import type { IAccount } from '@/types'

export function accountLoginRequest(account: IAccount) {
  return hyRequest.post({
    url: "/login",
    data: account
  })
}

// 获取用户的对应信息
export function getUserInfoById(id: number) {
  return hyRequest.get({
    url: `/users/${id}`,
  })
}

// 根据id查菜单
export function getUserMenusByRoleId(id: number) {
  return hyRequest.get({
    url: `/role/${id}/menu`,
  })
}